#ifndef SHOP2_H
#define SHOP2_H
#include <iostream>
#include <string>
using namespace std;
typedef int ut;
typedef struct Snode
    {
        int id;
        string name;
        struct Snode * next;
      
    }Snode,*LinkSnode;

class ShopMark
{
 
    public:
         ShopMark():ls(NULL){}
         ShopMark(struct Snode *);
         void DeleteNode(ut *t);
         void AddNode();
         void QueryAllNode();
       void InitNode();
        
    private:
        LinkSnode ls;
};

void ShopMark::InitNode( )
{  
    ls=new Snode;
     ls->next=NULL;
     ls->id=0;
     ls->name="";
     
}
ShopMark::ShopMark(LinkSnode ssnode)
{
    ls=ssnode;
   
}
void ShopMark::DeleteNode(ut *t)
{
   
}
void ShopMark::AddNode()
{  
   LinkSnode lstemp,lstemp1;
   lstemp=new Snode;
   lstemp->next=NULL;
   cin>>lstemp->id;
   cin>>lstemp->name;
   lstemp1=ls;
    while(lstemp1->next !=NULL)
     lstemp1 =lstemp1->next;
     lstemp1->next=lstemp;
   
   
}

void ShopMark::QueryAllNode()
{ 
    LinkSnode lstemp;
    lstemp=ls;
    cout<<endl;
    while(lstemp!=NULL)
       {  cout<<lstemp->id;cout<<lstemp->name;lstemp=lstemp->next;
           cout<<endl;
             
        }
        
}




#endif
